home *** CD-ROM | disk | FTP | other *** search
-
- /*
- *
- * GDS102 : パレットレジスタの設定
- *
- */
-
- #include <stdio.h>
- #include <dos.h>
-
- unsigned int GDS_palette(unsigned int color,unsigned char red,unsigned char green,unsigned char blue) {
- union REGS inregs, outregs;
- struct SREGS segregs;
- static struct {
- unsigned int length;
- unsigned int color;
- unsigned char dust;
- unsigned char red;
- unsigned char green;
- unsigned char blue;
- } work;
-
- work.length=6;
- work.color=color;
- work.dust=0;
- work.red=red;
- work.green=green;
- work.blue=blue;
- segread(&segregs);
- segregs.ds=_DS;
- inregs.x.di=(unsigned int)&work;
- inregs.x.ax=0x8300;
- int86x(0x92,&inregs,&outregs,&segregs);
- return (unsigned int)outregs.h.ah;
- }